package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CwUserOrderMapper;
import com.ruoyi.system.domain.CwUserOrder;
import com.ruoyi.system.service.ICwUserOrderService;

/**
 * 订单管理Service业务层处理
 * 
 * @author hyx
 * @date 2025-02-27
 */
@Service
public class CwUserOrderServiceImpl implements ICwUserOrderService 
{
    @Autowired
    private CwUserOrderMapper cwUserOrderMapper;

    /**
     * 查询订单管理
     * 
     * @param orderId 订单管理主键
     * @return 订单管理
     */
    @Override
    public CwUserOrder selectCwUserOrderByOrderId(Long orderId)
    {
        return cwUserOrderMapper.selectCwUserOrderByOrderId(orderId);
    }

    /**
     * 查询订单管理列表
     * 
     * @param cwUserOrder 订单管理
     * @return 订单管理
     */
    @Override
    public List<CwUserOrder> selectCwUserOrderList(CwUserOrder cwUserOrder)
    {
        return cwUserOrderMapper.selectCwUserOrderList(cwUserOrder);
    }

    /**
     * 新增订单管理
     * 
     * @param cwUserOrder 订单管理
     * @return 结果
     */
    @Override
    public int insertCwUserOrder(CwUserOrder cwUserOrder)
    {
        return cwUserOrderMapper.insertCwUserOrder(cwUserOrder);
    }

    /**
     * 修改订单管理
     * 
     * @param cwUserOrder 订单管理
     * @return 结果
     */
    @Override
    public int updateCwUserOrder(CwUserOrder cwUserOrder)
    {
        cwUserOrder.setUpdateTime(DateUtils.getNowDate());
        return cwUserOrderMapper.updateCwUserOrder(cwUserOrder);
    }

    /**
     * 批量删除订单管理
     * 
     * @param orderIds 需要删除的订单管理主键
     * @return 结果
     */
    @Override
    public int deleteCwUserOrderByOrderIds(Long[] orderIds)
    {
        return cwUserOrderMapper.deleteCwUserOrderByOrderIds(orderIds);
    }

    /**
     * 删除订单管理信息
     * 
     * @param orderId 订单管理主键
     * @return 结果
     */
    @Override
    public int deleteCwUserOrderByOrderId(Long orderId)
    {
        return cwUserOrderMapper.deleteCwUserOrderByOrderId(orderId);
    }
}
